﻿using System.Collections.Generic;
using System.Linq;
using Model.Database;
using SearchModel;

namespace IBll
{
    public partial interface IRoleBll
    {
        /// <summary>
        /// 条件分页查询
        /// </summary>
        List<Role> GetListBySearchPage(int pageIndex, int pageSize, out int total, SMRole smUserInfo);
        /// <summary>
        /// 批量删除
        /// </summary>
        void ListDelete(string[] idArr);
        /// <summary>
        /// 获取角色权限
        /// </summary>
        List<Power> GetPower(string id);
        /// <summary>
        /// 根据Id数组获取角色集合
        /// </summary>
        List<Role> GetRoleListByIdArr(string[] roleIdArr);
        /// <summary>
        /// 添加角色和Role_Power关系表
        /// </summary>
        bool AddRoleAndRole_Power(Role pmRole);
        /// <summary>
        /// 更新角色和Role_Power关系表
        /// </summary>
        bool UpdateRoleAndRole_Power(Role roleOld);
        /// <summary>
        /// 获取所有角色_异步
        /// </summary>
        /// <returns></returns>
        List<Role> GetList_Async();
    }
}
